/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkgjeudestrategie.ressource;

import java.awt.Color;
import java.awt.Graphics;
import pkgjeudestrategie.Territoire;

/**
 *
 * @author Marvens
 */
public class MineDor extends Ressource {
    static int coutNv1=1000;
    static int coutNv2=1500;
    static int coutNv3=2000;
    static int coutNv4=3000;
    static int coutNv5=4000;
    static int revenuNv0=1000;
    static int revenuNv1=1500;
    static int revenuNv2=2000;
    static int revenuNv3=3000;
    static int revenuNv4=4000;
    public MineDor(int position) {
        super(position);
       setPosition();
    }
    
    
    public String toString(){
        return "Mines d'or niv."+level;
    }
     @Override
    public void paintComponent(Graphics g) {
        
       g.setColor(Color.YELLOW);
        g.fillRect(x, y, (int) ((getWidth() / 2)), (int) ((getWidth() / 2)));
    }
public int getTypeInt(){
    return 3;
}

    @Override
    public int getCout(boolean b) {
        int x=-1;
        if(level==0){
           if(b){ x=coutNv1;}
           else if(!b){
              x=revenuNv0; 
           }
        }
        else if(level==1){
            if(b){ x=coutNv2;}
           else if(!b){
              x=revenuNv1; 
           }
        }
        else if(level==2){
           if(b){ x=coutNv3;}
           else if(!b){
              x=revenuNv2; 
           }
        }
        else if(level==3){
            if(b){ x=coutNv4;}
           else if(!b){
              x=revenuNv3; 
           }
        }
        else if(level==4){
            if(b){ x=coutNv5;}
           else if(!b){
              x=revenuNv4; 
           }
        }
        else if(level==5){
            if(!b){x=revenuNv5;}
        }
        return x;
    }
}
